<?php

declare(strict_types=1);

namespace App\Model\Admin;



use App\Model\Model;
use Carbon\Carbon;

/**
 * @property int $id 主键
 * @property string $name 名称
 * @property string $url 文件
 * @property int $created_by 管理员
 * @property int $file_size 文件大小
 * @property string $mime_type mime类型
 * @property int $image_width 图片宽度
 * @property int $image_height 图片高度
 * @property string $ext 扩展名
 * @property string $storage 存储位置
 * @property Carbon $created_at 上传时间
 * @property string $category 类别
 * @property Carbon $updated_at 更新时间
 * @property int $updated_by 修改人
 */
class Upload extends Model
{
    /**
     * The table associated with the model.
     */
    protected ?string $table = 'uploads';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = ['id', 'name', 'url', 'created_by', 'file_size', 'mime_type', 'image_width', 'image_height', 'ext', 'storage', 'created_at', 'category', 'updated_at', 'updated_by'];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = ['id' => 'integer', 'created_by' => 'integer', 'file_size' => 'integer', 'image_width' => 'integer', 'image_height' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime', 'updated_by' => 'integer'];
}
